module.exports = (sequelize, DataTypes) => {
    const Editor = sequelize.define(
        "editor",
        {
            // 在这里定义模型属性
            id: {
                type: DataTypes.INTEGER, //模型字段类型
                primaryKey: true, //主键
                autoIncrement: true, //自增长
            },
            html: {
                type: DataTypes.STRING(9999),
                allowNull: false,
            },
            src: {
                type: DataTypes.STRING,
                allowNull: true,
            },
            copy_writing: {
                type: DataTypes.STRING,
                allowNull: true,
            },
        },
        {
            tableName: "editor",
            timestamps: true,
        }
    );

    return Editor;
};
